﻿using System.Web;
using BLL;
using System.Data;
using System.IO;
using System.Web.Script.Serialization;
using System.Configuration;
using System;


namespace website.MFG
{
    /// <summary>
    /// MFGCusha 的摘要说明
    /// </summary>
    public class MFGCusha : IHttpHandler
    {
        HttpRequest Request = null;
        HttpResponse Response = null;

        string Action = "";
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Request = context.Request;
            Response = context.Response;

            Action = Request.Params["Action"];

            // 整体粗纱实时数据记录   定时刷新时候使用
            if (this.Action == "getshishijilulist")
            {
                context.Response.Write(this.getshishijilulist());
            }
            else if (this.Action == "initFangshaKind")
            {
                context.Response.Write(this.initFangshaKind());
            }
            else if (this.Action == "inittotalFangshaKind")
            {
                context.Response.Write(this.inittotalFangshaKind());
            }
            else if (this.Action == "getluoshacanshu")
            {
                context.Response.Write(this.getluoshacanshu());
            }
            else if (this.Action == "getEquNolistByCustomerID")
            {
                context.Response.Write(this.getEquNolistByCustomerID());
            }
            else if (this.Action == "getBanciByCustomerID")
            {
                context.Response.Write(this.getBanciByCustomerID());
            }
            else if (this.Action == "initmubiaochanliang")
            {
                context.Response.Write(this.initmubiaochanliang());
            }
            else if (this.Action == "initdangtaijianshidata")
            {
                context.Response.Write(this.initdangtaijianshidata());
            }
            else if (this.Action == "initcurrentluoshaStartEnd")
            {
                context.Response.Write(this.initcurrentluoshaStartEnd());
            }
            else if (this.Action == "initdantaicushabaojingtable")
            {
                context.Response.Write(this.initdantaicushabaojingtable());
            }
            else if (this.Action == "initshishitongjitu")
            {
                context.Response.Write(this.initshishitongjitu());
            }
            else if (this.Action == "inittingchepieA")
            {
                context.Response.Write(this.inittingchepieA());
            }
            else if (this.Action == "inittingcheyuanyin")
            {
                context.Response.Write(this.inittingcheyuanyin());
            }
            else if (this.Action == "initAlarmHandle")
            {
                context.Response.Write(this.initAlarmHandle());
            }
            else if (this.Action == "inittb_cushashengchanwancheng")
            {
                context.Response.Write(this.inittb_cushashengchanwancheng());
            }
            else if (this.Action == "initweishajibenxinxi")
            {
                context.Response.Write(this.initweishajibenxinxi());
            }
            else if (this.Action == "getWeishajianshi")
            {
                context.Response.Write(this.getWeishajianshi());
            }
            else if (this.Action == "initWeiShaTaiHaoByCustomerID")
            {
                context.Response.Write(this.initWeiShaTaiHaoByCustomerID());
            }
            else if (this.Action == "initdantaiweishabaojingtable")
            {
                context.Response.Write(this.initdantaiweishabaojingtable());
            }
            else if (this.Action == "initweishaKaitingcheInfo")
            {
                context.Response.Write(this.initweishaKaitingcheInfo());
            }
            else if (this.Action == "initweishaKaitingchedetailInfo")
            {
                context.Response.Write(this.initweishaKaitingchedetailInfo());
            }

        }



        /// <summary>
        /// 粗纱实时记录
        /// </summary>
        /// <returns></returns>
        // Token: 0x0600007A RID: 122 RVA: 0x00005F70 File Offset: 0x00004170
        public string getshishijilulist()
        {
            string id = this.Request["CustomerID"];
            string sortOrder = this.Request["sortOrder"];
            string text = this.Request["sort"];
            string text2 = this.Request["time"];
            if (string.IsNullOrEmpty(text))
            {
                text = "EquNo";
            }
            if (text2 == "")
            {
                text2 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            }
            return CushaBLL.getshishijilulist(id, sortOrder, text, text2);
        }

        // Token: 0x0600007B RID: 123 RVA: 0x00006018 File Offset: 0x00004218
        public string getluoshacanshu()
        {
            string id = this.Request["CustomerID"];
            string sortOrder = this.Request["sortOrder"];
            string text = this.Request["sort"];
            if (string.IsNullOrEmpty(text))
            {
                text = "EquNo";
            }
            return CushaBLL.getluoshacanshu(id, sortOrder, text);
        }

        // Token: 0x0600007C RID: 124 RVA: 0x00006080 File Offset: 0x00004280
        public string getEquNolistByCustomerID()
        {
            string id = this.Request["CustomerID"];
            return CushaBLL.getEquNolistByCustomerID(id);
        }

        public string initFangshaKind()
        {
            string id = this.Request["CustomerID"];
            return CushaBLL.initFangshaKind(id);
        }

        public string inittotalFangshaKind()
        {
            string id = this.Request["CustomerID"];
            return CushaBLL.inittotalFangshaKind(id);
        }

        // Token: 0x0600007D RID: 125 RVA: 0x000060AC File Offset: 0x000042AC
        public string getBanciByCustomerID()
        {
            string id = this.Request["CustomerID"];
            return CushaBLL.getBanciByCustomerID(id);
        }

        // Token: 0x0600007E RID: 126 RVA: 0x000060D8 File Offset: 0x000042D8
        public string initdangtaijianshidata()
        {
            string equNo = this.Request["EquNo"];
            string taiHao = this.Request["TaiHao"];
            string time = this.Request["Time"];
            return CushaBLL.initdangtaijianshidata(equNo, taiHao, time);
        }

        // Token: 0x0600007F RID: 127 RVA: 0x0000612C File Offset: 0x0000432C
        public string initcurrentluoshaStartEnd()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string time = this.Request["Time"];
            string parmValue = this.Request["parmValue"];
            string parmText = this.Request["parmText"];
            return CushaBLL.initcurrentluoshaStartEnd(customerID, taiHao, time, parmValue, parmText);
        }

        // Token: 0x06000080 RID: 128 RVA: 0x000061A8 File Offset: 0x000043A8
        public string initmubiaochanliang()
        {
            string customerID = this.Request["CustomerID"];
            return CushaBLL.initmubiaochanliang(customerID);
        }

        // Token: 0x06000081 RID: 129 RVA: 0x000061D4 File Offset: 0x000043D4
        public string initdantaicushabaojingtable()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string startTime = this.Request["StartTime"];
            string endTime = this.Request["EndTime"];
            return CushaBLL.initdantaicushabaojingtable(customerID, taiHao, startTime, endTime);
        }

        // Token: 0x06000082 RID: 130 RVA: 0x0000623C File Offset: 0x0000443C
        public string initshishitongjitu()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string valuetype = this.Request["valuetype"];
            string texttype = this.Request["texttype"];
            string tipStartValue = this.Request["tipStartValue"];
            string tipEndValue = this.Request["tipEndValue"];
            string time = this.Request["Time"];
            return CushaBLL.initshishitongjitu(customerID, taiHao, valuetype, texttype, tipStartValue, tipEndValue, time);
        }

        // Token: 0x06000083 RID: 131 RVA: 0x000062E0 File Offset: 0x000044E0
        public string inittingchepieA()
        {
            string equNo = this.Request["EquNo"];
            return CushaBLL.inittingchepieA(equNo);
        }

        // Token: 0x06000084 RID: 132 RVA: 0x0000630C File Offset: 0x0000450C
        public string inittingcheyuanyin()
        {
            string equNo = this.Request["EquNo"];
            string type = this.Request["type"];
            return CushaBLL.inittingcheyuanyin(equNo, type);
        }

        // Token: 0x06000085 RID: 133 RVA: 0x0000634C File Offset: 0x0000454C
        public string initAlarmHandle()
        {
            string equNo = this.Request["EquNo"];
            string alarmName = this.Request["AlarmName"];
            return CushaBLL.initAlarmHandle(equNo, alarmName);
        }

        // Token: 0x06000086 RID: 134 RVA: 0x0000638C File Offset: 0x0000458C
        public string inittb_cushashengchanwancheng()
        {
            string customerID = this.Request["CustomerID"];
            string text = this.Request["time"];
            if (text == "")
            {
                text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            }
            return CushaBLL.inittb_cushashengchanwancheng(customerID, text);
        }

        // Token: 0x06000087 RID: 135 RVA: 0x000063F4 File Offset: 0x000045F4
        public string initweishajibenxinxi()
        {
            string customerID = this.Request["CustomerID"];
            string text = this.Request["time"];
            if (text == "")
            {
                text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            }
            return CushaBLL.initweishajibenxinxi(customerID, text);
        }

        // Token: 0x06000088 RID: 136 RVA: 0x0000645C File Offset: 0x0000465C
        public string getWeishajianshi()
        {
            string customerID = this.Request["CustomerID"];
            string text = this.Request["time"];
            if (text == "")
            {
                text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            }
            return CushaBLL.getWeishajianshi(customerID, text);
        }

        // Token: 0x06000089 RID: 137 RVA: 0x000064C4 File Offset: 0x000046C4
        public string initWeiShaTaiHaoByCustomerID()
        {
            string id = this.Request["CustomerID"];
            return CushaBLL.initWeiShaTaiHaoByCustomerID(id);
        }

        // Token: 0x0600008A RID: 138 RVA: 0x000064F0 File Offset: 0x000046F0
        public string initdantaiweishabaojingtable()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string startTime = this.Request["StartTime"];
            string endTime = this.Request["EndTime"];
            return CushaBLL.initdantaiweishabaojingtable(customerID, taiHao, startTime, endTime);
        }

        // Token: 0x0600008B RID: 139 RVA: 0x00006558 File Offset: 0x00004758
        public string initweishaKaitingcheInfo()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string type = this.Request["Type"];
            string banCi = this.Request["BanCi"];
            string startTime = this.Request["StartTime"];
            string endTime = this.Request["EndTime"];
            return CushaBLL.initweishaKaitingcheInfo(customerID, taiHao, type, banCi, startTime, endTime);
        }

        // Token: 0x0600008C RID: 140 RVA: 0x000065E8 File Offset: 0x000047E8
        public string initweishaKaitingchedetailInfo()
        {
            string customerID = this.Request["CustomerID"];
            string taiHao = this.Request["TaiHao"];
            string type = this.Request["Type"];
            string banCi = this.Request["BanCi"];
            string startTime = this.Request["StartTime"];
            string endTime = this.Request["EndTime"];
            return CushaBLL.initweishaKaitingchedetailInfo(customerID, taiHao, type, banCi, startTime, endTime);
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }

       
    }
}